package com.five.admin.dao;

import com.five.entity.CourseClassify;

import java.util.List;

import com.five.entity.CourseClassify;
import com.five.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: star
 * @Date: 2021-05-21 14:18
 * 课程分类 model层
 */
public interface CourseClassifyMapper {
    List<CourseClassify> findAll();

    void insertCourseClassify(String typename);
    /**
     * @return 所有课程类型
     */
    List<CourseClassify> selectCourseClassify();

    int updateCourseClassify(CourseClassify courseClassify);

    CourseClassify findById(long id);

    void deleteCourseClassify(long id);

    /**
     * 模糊查询
     * @param typename
     * @return
     */
    List<CourseClassify> fuzzyQueryByTypename(@Param("typename") String typename,@Param("page") int page);

    /**
     * 计算课程类别总数
     * @return
     */
    int countCourseClassify(String typename);

}
